package com.example.lovebond.common;

public class HttpResult {
    private String code;
    private Object data;

    public static HttpResult ok() {
        var result = new HttpResult();
        result.code = "0000";
        return result;
    }

    public static HttpResult ok(Object data) {
        var result = new HttpResult();
        result.code = "0000";
        result.data = data;
        return result;
    }

    public static HttpResult error(Object data) {
        var result = new HttpResult();
        result.code = "0001";
        result.data = data;
        return result;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
